<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>表单状态伪类</title>
    <style>
        [type=text]:disabled{
            background:red;
        }
        :enabled{
            background:green;
        }
        p:nth-of-type(1)::selection{
            background:red;
            color:#fff;
            /*-webkit-user-select:none;在chrome中可以设置为没有选中状态*/  
        }
        p:nth-of-type(2)::selection{
            background:green;
            color:#fff;
        }
    </style>
</head>
<body>
    <input type="text" disabled>
    <input type="button" disabled>
    <input type="text">
    <br>
    <p>
        jdaskjdklajdklajskljaskljdlaksj
    </p>
    <p>
        xcakdjhasjhjdahdkjahjhajksdhjhajks
    </p>
</body>
</html>
